package routers

import (
	"mygolang/controllers"

	beego "github.com/beego/beego/v2/server/web"
)

func init() {
	beego.Router("/", &controllers.MainController{})

	ns := beego.NewNamespace("/api/v1",
		beego.NSNamespace("/demo",
			beego.NSInclude(&controllers.DemoController{}),
		),
		beego.NSNamespace("/",
			beego.NSInclude(&controllers.LoginController{}),
		),
	)
	beego.AddNamespace(ns)
}
